<html>
<!-- Creation date: 13/01/2002 -->
<head>
<title></title>
<meta name="Description" content="">
<meta name="Keywords" content="">
<meta name="Author" content="RANDOM">
<meta name="Generator" content="AceHTML 4 Pro">
<link href="../SeldonWeb.css" type="text/css" rel="stylesheet">
<body>
<center><h1>IIntfCollection/IStrCollection/ICollection</h1></center>

<h2>Unit</h2>
	DCL_intf

<h2>Inheritance</h2>
	<p>Base interface</p>
	<p>inherited by</p>
	<ul>
		<li> <a href="List.html">IIntfList/IStrList/IList</a>
		<li> <a href="Set.html">IIntfSet/IStrSet/ISet</a>
	</ul>

<h2>Methods</h2>
<h3>IIntfCollection</h3>
<code>
    <b>function</b> Add(AObject: IInterface): Boolean;<br>
    <b>function</b> AddAll(ACollection: IIntfCollection): Boolean;<br>
    <b>procedure</b> Clear;<br>
    <b>function</b> Contains(AObject: IInterface): Boolean;<br>
    <b>function</b> ContainsAll(ACollection: IIntfCollection): Boolean;<br>
    <b>function</b> Equals(ACollection: IIntfCollection): Boolean;<br>
    <b>function</b> First: IIntfIterator;<br>
    <b>function</b> IsEmpty: Boolean;<br>
    <b>function</b> Last: IIntfIterator;<br>
    <b>function</b> Remove(AObject: IInterface): Boolean;<br>
    <b>function</b> RemoveAll(ACollection: IIntfCollection): Boolean;<br>
    <b>function</b> RetainAll(ACollection: IIntfCollection): Boolean;<br>
    <b>function</b> Size: Integer;<br>
</code>
	
<h3>IStrCollection</h3>
<code>
    <b>function</b> Add(<b>const</b> AString: <b>string</b>): Boolean;<br>
    <b>function</b> AddAll(ACollection: IStrCollection): Boolean;<br>
    <b>procedure</b> Clear;<br>
    <b>function</b> Contains(<b>const</b> AString: <b>string</b>): Boolean;<br>
    <b>function</b> ContainsAll(ACollection: IStrCollection): Boolean;<br>
    <b>function</b> Equals(ACollection: IStrCollection): Boolean;<br>
    <b>function</b> First: IStrIterator;<br>
    <b>function</b> IsEmpty: Boolean;<br>
    <b>function</b> Last: IStrIterator;<br>
    <b>function</b> Remove(<b>const</b> AString: <b>string</b>): Boolean;<br>
    <b>function</b> RemoveAll(ACollection: IStrCollection): Boolean;<br>
    <b>function</b> RetainAll(ACollection: IStrCollection): Boolean;<br>
    <b>function</b> Size: Integer;<br>
</code>

<h3>ICollection</h3>
<code>
    <b>function</b> Add(AObject: TObject): Boolean;<br>
    <b>function</b> AddAll(ACollection: ICollection): Boolean;<br>
    <b>procedure</b> Clear;<br>
    <b>function</b> Contains(AObject: TObject): Boolean;<br>
    <b>function</b> ContainsAll(ACollection: ICollection): Boolean;<br>
    <b>function</b> Equals(ACollection: ICollection): Boolean;<br>
    <b>function</b> First: IIterator;<br>
    <b>function</b> IsEmpty: Boolean;<br>
    <b>function</b> Last: IIterator;<br>
    <b>function</b> Remove(AObject: TObject): Boolean;<br>
    <b>function</b> RemoveAll(ACollection: ICollection): Boolean;<br>
    <b>function</b> RetainAll(ACollection: ICollection): Boolean;<br>
    <b>function</b> Size: Integer;<br>
</code>

<h2>Description</h2>

<p>A collection is an entity that handles a group of objects. This is the base interface for List and Set.</p>

<table border="1" width="80%" align="center" bgcolor="white" cellpadding="5" cellspacing="0">
  <tr>
  	<th bgcolor="silver"> Method	</td>
	<th bgcolor="silver"> Description </td>
  </tr>
  <tr>
    <td>Add</td>
    <td>
		Add <i>AObject</i> at the end of the collection. Return True if the method succeeds.
	</td>
  </tr>
  <tr>
    <td>AddAll</td>
    <td>
		Add all objetcs from <i>ACollection</i> at the end of the collection. Return True if the method succeeds.
	</td>
  </tr>
  <tr>
    <td>Clear</td>
    <td>
		Clear all objects contained in the collection.
	</td>
  </tr>
  <tr>
    <td>Contains</td>
    <td>
		Return True if the collection contains <i>AObject</i>.
	</td>
  </tr>
  <tr>
    <td>ContainsAll</td>
    <td>
		Return True if the collection contains all objects of <i>ACollection</i>.	
	</td>
  </tr>
  <tr>
    <td>Equals</td>
    <td>
		Return True if all objects of the collection are equal to all objects of <i>ACollection</i>.	
	</td>
  </tr>
  <tr>
    <td>First</td>
    <td>
		Return a new Iterator from the begin of the collection.	
	</td>
  </tr>
  <tr>
    <td>IsEmpty</td>
    <td>
		Return True if the collection does not contain any objects.		
	</td>
  </tr>
  <tr>
    <td>Last</td>
    <td>
		Return a new Iterator from the end of the collection.		
	</td>
  </tr>
  <tr>
    <td>Remove</td>
    <td>
		Remove <i>AObject</i> from the collection. Return True if the method succeeds.	
	</td>
  </tr>
  <tr>
    <td>RemoveAll</td>
    <td>
		Remove all objects from the collection contained in <i>ACollection</i>. Return True if the method succeeds.	
	</td>
  </tr>
  <tr>
    <td>RetainAll</td>
    <td>
		Remove all objects from the collection except all objects contained in <i>ACollection</i>.
		Return True if the method succeeds.	
	</td>
  </tr>
  <tr>
    <td>Size</td>
    <td>
		Return the number of objects contained in the collection.	
	</td>
  </tr>
</table>

<h2>Implemented By</h2>
	<ul>
		<li> <a href="../Classes/ArrayList.html">ArrayList</a>
		<li> <a href="../Classes/ArraySet.html">ArraySet</a>
		<li> <a href="../Classes/HashSet.html">HashSet</a>
		<li> <a href="../Classes/LinkedList.html">LinkedList</a>
		<li> <a href="../Classes/Vector.html">Vector</a>
	</ul>
</body>
</html>
